import requests
from config import BASE_URL
from common import loggin_config
logger=loggin_config.get_logger()
class Autometer():
    def login(self,data):
        url=BASE_URL+"/account/token"
        headers={
            "Content-Type":"application/json;charset=utf-8"
        }

        resp=requests.post(url,headers=headers,json=data)

        return resp
if __name__=="__main__":
    demo=Autometer()
    data = {
        "name": "test",
        "password": "test123"
    }
    demo.login(data)